<include file="Public:header" />
<include file="Public:left" />
<form action="" method="post" enctype="multipart/form-data" id="brandForm">
    <section>
        <h2><strong>加入我们</strong></h2>
        <ul class="ulColumn2">
            <li>
                <span class="item_name" style="width:120px;">国家：</span>
                <input type="text" value="" class="textbox textbox_295" name="state" id="state" placeholder="国家名称"/>
            </li>
            <li>
                <span class="item_name" style="width:120px;"></span>
                <input type="button" class="link_btn" value="提交"/>
            </li>
        </ul>
    </section>
</form>
<table>
    <tr>
        <th>id</th>
        <th>国家</th>
        <th>操作</th>
    </tr>
    <volist name="data" id="vo">
        <tr>
            <td>{$vo.id}</td>
            <td>{$vo.state_name}</td>
            <td>
                <a href="{:url('Set/state',array('id'=>$vo.id))}" class="inner_btn">编辑</a>
                <a href="javascript:void(0)" id="{$vo.id}"  class="inner_btn state_del" >删除</a>
            </td>
        </tr>
    </volist>


</table>
<script>
    $(".link_btn").click(function(){
        var state = $("input[name='state']").val();

        $.post("{:url('Set/state')}",{state:state},function(result){
            if(result.code == '0'){
                layer.alert(result.msg);
            }else{
                layer.alert(result.msg, {
                            btn: ['确定']
                        },
                        function (index, item) {
                            location.href = result.url;
                        });
            }
        });
    });
</script>
</div>
</section>
<script type="text/javascript">

    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');


    function isFocus(e){
        alert(UE.getEditor('editor').isFocus());
        UE.dom.domUtils.preventDefault(e)
    }
    function setblur(e){
        UE.getEditor('editor').blur();
        UE.dom.domUtils.preventDefault(e)
    }
    function insertHtml() {
        var value = prompt('插入html代码', '');
        UE.getEditor('editor').execCommand('insertHtml', value)
    }
    function createEditor() {
        enableBtn();
        UE.getEditor('editor');
    }


</script>
</body>
</html>
